/**
 * @author furthurr
 */
var win = Titanium.UI.currentWindow;
win.backgroundColor = 'pink';
var sistemas = Titanium.UI.createButton({
	title:'Sistemas',
	top:150,
	bottom:280,	
	left:20,
	right:130	
});
var bclose = Titanium.UI.createButton({
	title:'cerrar',
	top:350,
	bottom:80,
	left:20,
	right:130
});


win.add(sistemas);
win.add(bclose);
bclose.addEventListener('click', function (e){
	var Menu = Titanium.UI.createWindow({
		url:'../appDoctorados.js'
	});
	Menu.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_DOWN});
});

sistemas.addEventListener('click', function (e){
	Titanium.API.info("Abriendo sistemas");
	var w = Ti.UI.createWindow();
            var wb = Ti.UI.createWebView({url:''});
            w.add(wb);
            var b = Titanium.UI.createButton({
                title:'Close',
                style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN
            });
            w.setLeftNavButton(b);
            b.addEventListener('click',function()
            {
                w.close();
            });
            w.open({modal:true});
       
});